package pers.hl.module_main.main

import androidx.annotation.NonNull
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.viewpager2.adapter.FragmentStateAdapter

/**
 * description：
 */
class MainViewPagerAdapter(@NonNull fa: FragmentActivity, @NonNull fragments: List<Fragment>): FragmentStateAdapter(fa) {

    private var fragmentList = fragments

    override fun getItemCount(): Int {
        return fragmentList.size
    }

    override fun createFragment(position: Int): Fragment {
        return fragmentList[position]
    }
}